<!-- 厂区下拉框 -->
<template>
  <px-form-item label="厂区">
    <px-select v-model="facCode" disabled placeholder="请选择厂区" style="width: 100%">
      <px-option v-for="item in facList" :key="item.id" :label="item.name" :value="item.code" />
    </px-select>
  </px-form-item>
</template>

<script setup lang="ts">
import { ref } from "vue";

// 获取系统中的统一的厂区，下拉框处理
const facCode = ref(localStorage.getItem("facCode"));
const tempFacList = JSON.parse(localStorage.getItem("facList"));
const facList = tempFacList?.filter(item => facCode.value === item.code);
</script>
